JavaScript

{grid.object}closeParentContainer Method

Syntax

{grid.Object}.closeParentContainer()

Description

If a Grid is displayed in a pop-up Ajax window, or a Tabbed UI pane, closes the parent window or Tabbed UI pane.

Example

Assume that a Grid is displayed in either a pop-up Ajax window, or a Tabbed UI pane and that after the user has submitted changes to the Grid, and assuming that there were no errors, you would like to close the window in which the Grid is displayed, or the Tabbed UI pane.

You could put this code in the afterGridSubmit and afterRowSubmit client-side Javascript events:

if(e.hasErrors == false) {
    {grid.object}.closeParentContainer();
}
The afterGridSubmit and afterRowSubmit methods set the hasErrors property of the e object and we only want to close the parent container if there were no errors.

See Also